<template>
  <el-dialog :title="upload.title" :visible.sync="upload.open" width="800px" append-to-body>
    <div style="display: flex;justify-content: space-around;">
      <span>会议室场地: {{ upload.row.meetInfo.orgName }}</span>
      <span>会议室名称: {{upload.row.meetInfo.meetName}}</span>
      <span>会议室编号: {{ upload.row.meetInfo.meetId }}</span>
    </div>
    <el-descriptions style="margin-bottom: 20px;" :column="2" border v-for="(form, index) in upload.row.meetList"
      :key="index">
      <el-descriptions-item>
        <template slot="label" :span="2">
          预约时间段
        </template>
        {{ form.startTime + "-" + form.endTime.slice(10) }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          预约人
        </template>
        {{ form.flCreator }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          联系方式
        </template>
        {{ form.flCreatorPhone }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          参会人数
        </template>
        {{ form.numPeople }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          备注
        </template>
        {{ form.remark }}
      </el-descriptions-item>
    </el-descriptions>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" plain @click="upload.open = false">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  props: {
    upload: {
      type: Object,
      // 导入参数
      default: {
        // 是否显示弹出层
        open: false,
        // 弹出层标题
        title: "详情",
        // 详情信息
        row: []
      }
    },
  },
  data() {
    return {

    };
  },
  created(){
    console.log('upload', this.upload);
    this.upload.row.meetList.length > 0 && this.upload.row.meetList.sort((a, b) => a.startTime.slice(11, 13) - b.startTime.slice(11, 13))
  },
  methods: {
    closeDialog(){
      this.upload.open = false
      this.$emit('closeDialog')
    }
  }
}
</script>